package com.zhangjie.apidriver.service;

import com.zhangjie.apidriver.remote.ServiceDriverUserClient;
import com.zhangjie.internalcommon.dto.DriverCarBindingRelationship;
import com.zhangjie.internalcommon.dto.DriverUser;
import com.zhangjie.internalcommon.dto.DriverUserWorkStatus;
import com.zhangjie.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: zj
 * @Date: 2024/2/26 - 02 - 26 - 10:15
 * @Description: com.zhangjie.apidriver.service
 * @version: 1.0
 */
@Service
public class UserService {

    @Autowired
    private ServiceDriverUserClient serviceDriverUserClient;

    public ResponseResult updateUser(DriverUser driverUser) {

        return serviceDriverUserClient.updateUser(driverUser);
    }

    public ResponseResult changeWorkStatus(DriverUserWorkStatus driverUserWorkStatus) {

        return serviceDriverUserClient.changeWorkStatus(driverUserWorkStatus);
    }

    public ResponseResult<DriverCarBindingRelationship> getDriverCarBindingRelationship(String driverPhone){

        return serviceDriverUserClient.getDriverCarRelationship(driverPhone);
    }

    public ResponseResult<DriverUserWorkStatus> getWorkStatus(Long driverId){
        return serviceDriverUserClient.getWorkStatus(driverId);
    }
}
